﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
           
            while (true)
            {
                Robot r = new CookRobot();
                Console.WriteLine("1：炒菜 2：传菜");
                Console.WriteLine("请输入");
                string c = Convert.ToString(Console.ReadLine());
                switch (c)
                {
                    case "1":
                        r = Test("炒菜");
                        break;
                    case "2":
                        r = Test("传菜");
                        break;
                    default:
                        Console.WriteLine("输入错误！");
                        break;

                }
                r.Wooking();
            }
        }
        public static Robot Test(string s)
        {
            Robot robot = new CookRobot();
            if (s == "炒菜")
            {
                robot = new CookRobot("小炒",Cook.包菜);
            }
            if (s == "传菜")
            {
                robot = new DeliveryRobot("小传",0.5);
            }
            return robot;
        }
    }
}
